<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.util.*"%>
<%
request.setCharacterEncoding("utf-8");//设置页面字符集
DBO db=new DBO();//数据库链接
//初始化变量
    String id="",  applyusername="", applydate="", mobile="", title="", usercount="", bj="", actitvtyroom="", appointmentdate="", remark="", status="",  auditor="";

id=(String)request.getParameter("id");//主键
String sql="select * from actitvtyappointment where id="+id;//定义查询sql语句
    ResultSet rs=null;//定义查询结果集
    db.open();//打开数据库链接
    rs=db.query(sql);//执行查询结果

/*
信息修改页面
*/
    if(rs.next()){// 遍历结果集查询 相应的变量
        id=rs.getString("id");
        applyusername=rs.getString("applyusername");
        applydate=rs.getString("applydate");
        mobile=rs.getString("mobile");
        title=rs.getString("title");
        usercount=rs.getString("usercount");
        bj=rs.getString("bj");
        actitvtyroom=rs.getString("actitvtyroom");
        appointmentdate=rs.getString("appointmentdate");
        remark=rs.getString("remark");
        status=rs.getString("status");
        auditor=rs.getString("auditor");
                        
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK href="../images/style.css" type=text/css rel=stylesheet>
<link rel="stylesheet" type="text/css" media="screen" href="../css/tinyTips.css" />

<script language="javascript">
function checkDo(){


        
if(form.applyusername.value==""){
alert("申请人不能为空");
return false;
form.applyusername.focus();
}

        
if(form.applydate.value==""){
alert("申请时间不能为空");
return false;
form.applydate.focus();
}

        
if(form.mobile.value==""){
alert("联系电话不能为空");
return false;
form.mobile.focus();
}

        
if(form.title.value==""){
alert("活动名称不能为空");
return false;
form.title.focus();
}

        
if(form.usercount.value==""){
alert("用户数量不能为空");
return false;
form.usercount.focus();
}

        
if(form.bj.value==""){
alert("班级不能为空");
return false;
form.bj.focus();
}

        
if(form.actitvtyroom.value==""){
alert("活动室不能为空");
return false;
form.actitvtyroom.focus();
}

        
if(form.appointmentdate.value==""){
alert("预约时间不能为空");
return false;
form.appointmentdate.focus();
}

        
if(form.remark.value==""){
alert("备注不能为空");
return false;
form.remark.focus();
}

        
if(form.status.value==""){
alert("状态不能为空");
return false;
form.status.focus();
}

        
if(form.auditor.value==""){
alert("审核人不能为空");
return false;
form.auditor.focus();
}



form.action="update_sql.jsp";
form.submit();
}
</script>

</head>
<body>

<form name="form" action="" method="post" >
<div class=formzone>
<DIV class=searchzone>

<TABLE height=30 cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD height=30>预约记录修改</TD>
    <TD align=right colSpan=2>&nbsp;</TD>
  </TR></TBODY></TABLE></DIV>
<div class=tablezone>
<div class=noticediv id=notice></div>
<TABLE cellSpacing=0 cellPadding=2 width="100%" align=center border=0>
  <TBODY>

        <tr >
<td align=middle width=100 height=30>申请人</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=applyusername value="<%=applyusername%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>申请时间</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=applydate value="<%=applydate%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>联系电话</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=mobile value="<%=mobile%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>活动名称</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=title value="<%=title%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>用户数量</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=usercount value="<%=usercount%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>班级</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=bj value="<%=bj%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>活动室</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=actitvtyroom value="<%=actitvtyroom%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>预约时间</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=appointmentdate value="<%=appointmentdate%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>备注</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=remark value="<%=remark%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>状态</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=status value="<%=status%>"></td>
</tr>

        <tr >
<td align=middle width=100 height=30>审核人</td><td height="30" ><input type="text"  class="input" style="FONT-SIZE: 12px; WIDTH: 300px" name=auditor value="<%=auditor%>"></td>
</tr>


</TBODY></TABLE>
</div>  <input type="hidden" name="id" value="<%=id%>">
<DIV class=adminsubmit> <input type="button" value="保存" name="B1" class="button" style="width:60px" onclick="checkDo()"  />
                      &nbsp;&nbsp;
                      <input type="reset" value="取消" style="width:60px" name="chanel" class="button" />
</div>
</div>
</form>
</body>
<%
db.close();
%>
</html>
